Optimal. Leaf size=144 \[ -\frac{2 b^4 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{a^2 d \left (a^2+b^2\right )^{3/2}}+\frac{b^2 \text{sech}(c+d x) (a \sinh (c+d x)+b)}{a^2 d \left (a^2+b^2\right )}-\frac{b \text{sech}(c+d x)}{a^2 d}+\frac{b \tanh ^{-1}(\cosh (c+d x))}{a^2 d}-\frac{\tanh (c+d x)}{a d}-\frac{\coth (c+d x)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.310752, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 11, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.379, Rules used = {2898, 2622, 321, 207, 2620, 14, 2696, 12, 2660, 618, 204} \[ -\frac{2 b^4 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{a^2 d \left (a^2+b^2\right )^{3/2}}+\frac{b^2 \text{sech}(c+d x) (a \sinh (c+d x)+b)}{a^2 d \left (a^2+b^2\right )}-\frac{b \text{sech}(c+d x)}{a^2 d}+\frac{b \tanh ^{-1}(\cosh (c+d x))}{a^2 d}-\frac{\tanh (c+d x)}{a d}-\frac{\coth (c+d x)}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2898
Rule 2622
Rule 321
Rule 207
Rule 2620
Rule 14
Rule 2696
Rule 12
Rule 2660
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{\text{csch}^2(c+d x) \text{sech}^2(c+d x)}{a+b \sinh (c+d x)} \, dx &=-\int \left (\frac{b \text{csch}(c+d x) \text{sech}^2(c+d x)}{a^2}-\frac{\text{csch}^2(c+d x) \text{sech}^2(c+d x)}{a}-\frac{b^2 \text{sech}^2(c+d x)}{a^2 (a+b \sinh (c+d x))}\right ) \, dx\\ &=\frac{\int \text{csch}^2(c+d x) \text{sech}^2(c+d x) \, dx}{a}-\frac{b \int \text{csch}(c+d x) \text{sech}^2(c+d x) \, dx}{a^2}+\frac{b^2 \int \frac{\text{sech}^2(c+d x)}{a+b \sinh (c+d x)} \, dx}{a^2}\\ &=\frac{b^2 \text{sech}(c+d x) (b+a \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}+\frac{b^2 \int \frac{b^2}{a+b \sinh (c+d x)} \, dx}{a^2 \left (a^2+b^2\right )}+\frac{i \operatorname{Subst}\left (\int \frac{1+x^2}{x^2} \, dx,x,i \tanh (c+d x)\right )}{a d}-\frac{b \operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{a^2 d}\\ &=-\frac{b \text{sech}(c+d x)}{a^2 d}+\frac{b^2 \text{sech}(c+d x) (b+a \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}+\frac{b^4 \int \frac{1}{a+b \sinh (c+d x)} \, dx}{a^2 \left (a^2+b^2\right )}+\frac{i \operatorname{Subst}\left (\int \left (1+\frac{1}{x^2}\right ) \, dx,x,i \tanh (c+d x)\right )}{a d}-\frac{b \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{a^2 d}\\ &=\frac{b \tanh ^{-1}(\cosh (c+d x))}{a^2 d}-\frac{\coth (c+d x)}{a d}-\frac{b \text{sech}(c+d x)}{a^2 d}+\frac{b^2 \text{sech}(c+d x) (b+a \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}-\frac{\tanh (c+d x)}{a d}-\frac{\left (2 i b^4\right ) \operatorname{Subst}\left (\int \frac{1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (i c+i d x)\right )\right )}{a^2 \left (a^2+b^2\right ) d}\\ &=\frac{b \tanh ^{-1}(\cosh (c+d x))}{a^2 d}-\frac{\coth (c+d x)}{a d}-\frac{b \text{sech}(c+d x)}{a^2 d}+\frac{b^2 \text{sech}(c+d x) (b+a \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}-\frac{\tanh (c+d x)}{a d}+\frac{\left (4 i b^4\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac{1}{2} (i c+i d x)\right )\right )}{a^2 \left (a^2+b^2\right ) d}\\ &=\frac{b \tanh ^{-1}(\cosh (c+d x))}{a^2 d}-\frac{2 b^4 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{a^2 \left (a^2+b^2\right )^{3/2} d}-\frac{\coth (c+d x)}{a d}-\frac{b \text{sech}(c+d x)}{a^2 d}+\frac{b^2 \text{sech}(c+d x) (b+a \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}-\frac{\tanh (c+d x)}{a d}\\ \end{align*}
Mathematica [A] time = 2.64522, size = 135, normalized size = 0.94 \[ -\frac{\frac{4 b^4 \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{-a^2-b^2}}\right )}{a^2 \left (-a^2-b^2\right )^{3/2}}+\frac{2 \text{sech}(c+d x) (a \sinh (c+d x)+b)}{a^2+b^2}+\frac{2 b \log \left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )}{a^2}+\frac{\tanh \left (\frac{1}{2} (c+d x)\right )}{a}+\frac{\coth \left (\frac{1}{2} (c+d x)\right )}{a}}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 174, normalized size = 1.2 \begin{align*} -{\frac{1}{2\,da}\tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{1}{2\,da} \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}}-{\frac{b}{d{a}^{2}}\ln \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) }+2\,{\frac{{b}^{4}}{d{a}^{2} \left ({a}^{2}+{b}^{2} \right ) ^{3/2}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( 1/2\,dx+c/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }-2\,{\frac{a\tanh \left ( 1/2\,dx+c/2 \right ) }{d \left ({a}^{2}+{b}^{2} \right ) \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) }}-2\,{\frac{b}{d \left ({a}^{2}+{b}^{2} \right ) \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 3.11544, size = 2483, normalized size = 17.24 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.72368, size = 262, normalized size = 1.82 \begin{align*} -\frac{b^{4} \log \left (\frac{{\left | -2 \, b e^{\left (d x + c\right )} - 2 \, a - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | -2 \, b e^{\left (d x + c\right )} - 2 \, a + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{{\left (a^{4} d + a^{2} b^{2} d\right )} \sqrt{a^{2} + b^{2}}} - \frac{2 \,{\left (a b e^{\left (3 \, d x + 3 \, c\right )} + b^{2} e^{\left (2 \, d x + 2 \, c\right )} - a b e^{\left (d x + c\right )} + 2 \, a^{2} + b^{2}\right )}}{{\left (a^{3} d + a b^{2} d\right )}{\left (e^{\left (4 \, d x + 4 \, c\right )} - 1\right )}} + \frac{b \log \left (e^{\left (d x + c\right )} + 1\right )}{a^{2} d} - \frac{b \log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right )}{a^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]